#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<string.h>
int main() {
    char str[10001] = { 0 };
    while (gets(str)) 
    {  
        int sz = strlen(str);
        for (int i = sz - 1; i >= 0; i--) 
        {
            printf("%c", str[i]);
        }
        printf("\n");
    }
}